package com.example.designModel.observe.process;

public class Main {
    public static void main(String[] args) {
        Boss huhansan = new Boss();
        StockObserver tongshi1 = new StockObserver("张飞", huhansan);
        StockObserver tongshi2 = new StockObserver("马超", huhansan);

        huhansan.attach(tongshi1);
        huhansan.attach(tongshi2);

        huhansan.detach(tongshi1);

        huhansan.setSubjectState("我胡汉三回来了!");
        huhansan.notified();

    }

}
